//
//  RNOLSettingSuccessTipView.m
//  RongNiuOnline
//
//  Created by apple on 2018/4/18.
//  Copyright © 2018年 rongniu. All rights reserved.
//

#import "RNOLSettingSuccessTipView.h"


@interface RNOLSettingSuccessTipView()

@property (weak, nonatomic) IBOutlet UIButton *tipButton;
@property (weak, nonatomic) IBOutlet UIButton *confirmButton;

@end

@implementation RNOLSettingSuccessTipView

+ (void)showAlert:(dispatch_block_t)block{
    WGBCustomPopUpView *popupView = [[WGBCustomPopUpView alloc] init];
    popupView.animationType = WGBAlertAnimationTypeAlert;
    UIView*bgView = [[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds];
    bgView.backgroundColor = [UIColor clearColor];
    bgView.userInteractionEnabled = YES;
    RNOLSettingSuccessTipView *tipView = [RNOLSettingSuccessTipView FromXIB];
    tipView.backgroundColor = [UIColor whiteColor];
    UIImage *img = [tipView.tipButton.imageView.image imageWithTintColor:RGB(111, 248, 112)];
    [tipView.tipButton setImage: img forState: UIControlStateNormal];
    tipView.frame = CGRectMake(0, 0, 280 , 120);
    tipView.center =CGPointMake(KWIDTH/2.0, KHIGHT/2 - 30);
    [tipView setAllCorner: 5];
    [tipView setLayerShadow:KBlackColor offset:CGSizeMake(1, 1) radius:3];
    [bgView addSubview: tipView];
    [tipView.confirmButton addTapActionWithBlock:^(UIGestureRecognizer *gestureRecoginzer) {
        !block? : block();
        [popupView dismiss];
    }];
    popupView.contentView = bgView;
    [popupView show];
}


@end
